<?php
namespace app\admin\validate;

use think\Validate;

/**
 * 注册验证
 */

class Register extends Validate
{

    protected $rule =   [
        'username'          => 'require|max:32',
        'nickname'          => 'max:32',
        'password'          => 'require|length:6,32',
        'pay_password'      => 'require|length:6,32',
    ];

    protected $message  =   [
        'username.require'      => 'Username require',
        'nickname.length'       => 'Please enter a correct nickname',
        'password.length'       => 'Please enter a correct password',
        'pay_password.length'   => 'Please enter a correct pay_password',
    ];

    /*protected $scene = [
        'add' => ['mobile','password', 'role_id'],
        'login' =>  ['mobile','password'],
        'edit' => ['mobile', 'password', 'role_id']
    ];*/

}



